package com.pattern.factory;

public class SimpleCoffeeFactory {

    public Coffee createCoffee(String type) {
        Coffee coffee=null;

        switch (type) {
            case "Meishi": coffee=new MeishiCoffee(type);break;
            default:
                System.out.println("没有该类咖啡");
        }
        return coffee;
    }


}
